<!DOCTYPE html>
<html lang="zh-cn">
<!--包含头部-->
{{include file="{{$smarty.const.APP_PATH}}Home/View/Public/header.html"}}
<body>
<div class="lefter">
    <div class="logo"><a href="/index"><img src="/images/logo.png" alt="后台管理系统" /></a></div>
</div>
<div class="righter nav-navicon" id="admin-nav">
    <div class="mainer">
        <!--导航-->
        {{include file="{{$smarty.const.APP_PATH}}Home/View/Public/nav.html"}}
        <div class="admin-bread">
            <span>您好，admin，欢迎您的光临。</span>
            <ul class="bread">
                <li><a href="/article/" class="icon-cog">文章管理</a></li>
                <li>文章分类管理</li>
            </ul>
        </div>
    </div>
</div>

<div class="admin">
	<form method="post" action="/article/index/category_delete_more_post">
    <div class="panel admin-panel">
    	<div class="panel-head"><strong>分类列表</strong></div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" checkfor="ids[]" value="全选" />
            <!--<input type="button" class="button active button-small" value="分类列表" />-->
            <input type="button" class="button button-small border-green" value="新增分类" onclick="javascript:window.location.href='/article/index/category_add'"/>
            <input type="button" class="button button-small border-red" value="删除所选" href="javascript:void(0);" onclick="{if(confirm('确认删除?')){submit();return true;}return false;}"/>
        </div>
        <table class="table table-hover">
        	<tr>
                <th width="60" style="text-align: center">选择</th>
                <th width="120" style="text-align: center">分类</th>
                <th width="*" style="text-align: center">上级分类</th>
                <th width="200" style="text-align: center">显示</th>
                <th width="100" style="text-align: center">操作</th>
            </tr>
            {{foreach from=$list item=i key=k}}
            <tr>
                <td align="center"><input type="checkbox" name="ids[]" value="{{$i.category_id}}" /></td>
                <td>{{$i.category_name}}</td>
                <td align="center">{{$i.category_parent_name}}</td>
                <td align="center">{{if $i.category_show==1}}<span class=" badge bg-green">显示</span>{{else}}<span class=" badge bg-red">隐藏</span>{{/if}}</td>
                <td>
                    <a class="button border-blue button-little" href="/article/index/category_edit/{{$i.category_id}}">修改</a>
                    <a class="button border-red button-little" href="javascript:void(0);" onclick="{if(confirm('确认删除?')){window.location.href='/article/index/category_delete/{{$i.category_id}}';return true;}return false;}">删除</a>
                </td>
            </tr>
            {{/foreach}}
        </table>
        <div class="panel-foot text-center">
            <ul class="pagination"><li><a href="/article/index/category">首页</a></li></ul>
            {{if $pager.current_page>$pager.last_page}}
            <ul class="pagination"><li><a href="/article/index/category/{{$pager.last_page}}">上一页</a></li></ul>
            {{/if}}
            <ul class="pagination pagination-group">
                {{if $pager.current_page<=10&&$pager.page_total<=10}}
                {{section name=loop loop=$pager.page_total}}
                <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/category/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                {{/section}}
                {{else if $pager.current_page>10&&$pager.current_page+10<$pager.page_total}}
                {{section name=loop loop=$pager.current_page+10 start=($pager.current_page/10)|string_format:"%d"*10}}
                <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/category/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                {{/section}}
                {{else if $pager.current_page>10&&$pager.current_page+10>$pager.page_total}}
                {{section name=loop loop=$pager.page_total start=($pager.current_page/10)|string_format:"%d"*10}}
                <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/category/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                {{/section}}
                {{else}}
                {{section name=loop loop=10}}
                <li {{if $smarty.section.loop.index+1==$pager.current_page}}class="active"{{/if}}><a href="/article/index/category/{{$smarty.section.loop.index+1}}">{{$smarty.section.loop.index+1}}</a></li>
                {{/section}}
                {{/if}}
            </ul>
            {{if $pager.current_page<$pager.next_page}}
            <ul class="pagination"><li><a href="/article/index/category/{{$pager.next_page}}">下一页</a></li></ul>
            <ul class="pagination"><li><a href="/article/index/category/{{$pager.page_total}}">尾页</a></li></ul>
            {{/if}}
        </div>
    </div>
    </form>
    <br />
    <!--包含底部-->
    {{include file="{{$smarty.const.APP_PATH}}Home/View/Public/footer.html"}}
</div>

<div class="hidden"><script src="#" language="JavaScript"></script></div>
</body>
</html>